<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
function modifyChk(){
	if( modifyForm.boardName.value==""){	//  == $('boardName').val() 같은 의미
		alert("게시판 명을 입력하세요.");
		return ;
	}
	if(modifyForm.AdminName==""){
		alert("등록자 명을 입력하세요.");
		return ;
	}
	if(modifyForm.explanation==""){
		alert("설명을 입력하세요.");
		return ;
	}
	var url = "/${initParam.context_root }/modifyAdminBoard.do";
	$("#modifyForm").attr({"action":url, "method":"post"}).submit();
}
</script>
<title>검색한 게시판 수정 및 삭제</title>
</head>
<body>
	<form id="modifyForm">
	<input type="hidden" name="boardNo" value="${boardVO.boardNo }" >
	<div align="right">
		<a href="/${initParam.context_root }/typeNine.do">[목록]</a>&nbsp; <a href="javascript:modifyChk();" >[수정하기]</a>&nbsp;
	</div>
	ν 기본정보<br>
	<table border="2" width="800px">
		<tr>
			<td bgcolor="lightgray">게시판 명</td>
			<td colspan="3"><input type="text"  name="boardName" value="${boardVO.boardName }" style="width: 650px;" maxlength="10"></td>
		</tr>
		<tr>
			<td bgcolor="lightgray">등록자</td>
			<td><input type="text" name="adminName" value="${boardVO.adminName }" maxlength="10"></td>
			<td bgcolor="lightgray">등록일시</td>
			<td><input type="text" name="registerDate" value="${boardVO.registerDate }" style="border: 0px" ></td>
		</tr>
		<tr>
			<td bgcolor="lightgray">설명</td>
			<td  colspan="3"><input type="text" id="explanation" name="explanation" value="${boardVO.explanation }" style="width: 650px;" maxlength="20"></td>
		</tr>
	</table><br>
	ν 선택정보<br>
	<table border="2" width="800px">
		<tr>
			<td bgcolor="lightgray"  width=20%>게시판종류</td>
			<td>
			<c:choose>
				<c:when test="${boardVO.boardType =='일반형' }">	
					<label><input type="radio" name="boardType" value="일반형" checked="checked">일반형</label>
					<label><input type="radio" name="boardType" value="자료실형">자료실형</label>
					<label><input type="radio" name="boardType" value="QnA형">QnA형</label>
					<label><input type="radio" name="boardType" value="FAQ형">FAQ형</label>
					<label><input type="radio" name="boardType" value="이미지형">이미지형</label>
				</c:when>
				<c:when test="${boardVO.boardType =='자료실형' }">	
					<label><input type="radio" name="boardType" value="일반형" >일반형</label>
					<label><input type="radio" name="boardType" value="자료실형" checked="checked">자료실형</label>
					<label><input type="radio" name="boardType" value="QnA형">QnA형</label>
					<label><input type="radio" name="boardType" value="FAQ형">FAQ형</label>
					<label><input type="radio" name="boardType" value="이미지형">이미지형</label>
				</c:when>
				<c:when test="${boardVO.boardType =='QnA형' }">	
					<label><input type="radio" name="boardType" value="일반형" >일반형</label>
					<label><input type="radio" name="boardType" value="자료실형">자료실형</label>
					<label><input type="radio" name="boardType" value="QnA형" checked="checked">QnA형</label>
					<label><input type="radio" name="boardType" value="FAQ형">FAQ형</label>
					<label><input type="radio" name="boardType" value="이미지형">이미지형</label>
				</c:when>
				<c:when test="${boardVO.boardType =='FAQ형' }">	
					<label><input type="radio" name="boardType" value="일반형" >일반형</label>
					<label><input type="radio" name="boardType" value="자료실형">자료실형</label>
					<label><input type="radio" name="boardType" value="QnA형">QnA형</label>
					<label><input type="radio" name="boardType" value="FAQ형" checked="checked">FAQ형</label>
					<label><input type="radio" name="boardType" value="이미지형">이미지형</label>
				</c:when>
				<c:when test="${boardVO.boardType =='이미지형' }">	
					<label><input type="radio" name="boardType" value="일반형" >일반형</label>
					<label><input type="radio" name="boardType" value="자료실형">자료실형</label>
					<label><input type="radio" name="boardType" value="QnA형">QnA형</label>
					<label><input type="radio" name="boardType" value="FAQ형" >FAQ형</label>
					<label><input type="radio" name="boardType" value="이미지형" checked="checked">이미지형</label>
				</c:when>
			</c:choose>
			</td>
		</tr>
		<tr>
			<td bgcolor="lightgray"  width=20%>카테고리</td>
			<td><input type="text"  name="category" value="${boardVO.category }" style="width: 650px;" maxlength="30">
			</td>
		</tr>
		<tr>
			<td bgcolor="lightgray"  width=20%>옵션
			</td>
			<td><input type="text" name="option" value="${boardVO.option }" style="width: 650px;" maxlength="20">
			</td>
		</tr>
	</table><br>
	ν 권한정보<br>
	<table border="2" width="800px">
		<tr>
			<td  bgcolor="lightgray" width=20%>관리 권한</td>
			<td>
			<select name="adminConstraint">
				<c:choose>
					<c:when test="${boardVO.adminConstraint eq 'yes'}">
						<option value="yes" selected="selected">Yes</option>
						<option value="no">No</option>
					</c:when>
					<c:otherwise>
						<option value="yes" >Yes</option>
						<option value="no" selected="selected">No</option>
					</c:otherwise>
				</c:choose>
			</select>
			</td>
		</tr>
		<tr>
			<td bgcolor="lightgray"  width=20%>작성 권한</td>
			<td>
			<select name="writeConstraint">
				<c:choose>
					<c:when test="${boardVO.writeConstraint eq 'yes'}">
						<option value="yes" selected="selected">Yes</option>
						<option value="no">No</option>
					</c:when>
					<c:otherwise>
						<option value="yes" >Yes</option>
						<option value="no" selected="selected">No</option>
					</c:otherwise>
				</c:choose>
			</select>
			</td>
		</tr>
		<tr>
			<td bgcolor="lightgray"  width=20%>읽기 권한</td>
			<td>
			<select name="readConstraint">
			<c:choose>
					<c:when test="${boardVO.readConstraint eq 'yes'}">
						<option value="yes" selected="selected">Yes</option>
						<option value="no">No</option>
					</c:when>
					<c:otherwise>
						<option value="yes" >Yes</option>
						<option value="no" selected="selected">No</option>
					</c:otherwise>
				</c:choose>
			</select>
			</td>
		</tr>
	</table>
	<div align="right">
		<a href="/${initParam.context_root }/typeNine.do">[목록]</a>&nbsp; <a href="javascript:modifyChk();" >[수정하기]</a>&nbsp;
	</div>
</form>	
</body>
</html>